package Factory;

/**
 * Created with IntelliJ IDEA.
 * User: breeze
 * Date: 11/15/12
 * Time: 10:17 AM
 * To change this template use File | Settings | File Templates.
 */
public class NYPizzaStore extends PizzaStore {

    protected Pizza createPizza (String item){

        Pizza pizza = null;
        PizzaIngredientFactory ingredientFactory = new NYPizzaIngredientFactory();

        if (item.equals("cheese")) {
            pizza = new CheesePizza(ingredientFactory);
            pizza.setName("This is NY cheese pizza");
        }

        return pizza;
    }
}
